<template>
	<view class="uni-popup-dialog">
		<view class=" p-20 banmi_flex j-c">
			<text class="v-text f38">提示</text>
		</view>
		<view class=" p-20 banmi_flex j-c">
			<text class="v-text f38">确认删除吗?</text>
		</view>


		<view class="" style="height: 30px;"></view>
		<view class="uni-dialog-button-group  ">
			<button class="uni-dialog-button uni-border-left" @click="on_close">
				<text class="uni-dialog-button-text uni-button-color">取消</text>
			</button>
			<button class="uni-dialog-button uni-border-left" @click="on_sava">
				<text class="uni-dialog-button-text uni-button-color">确认</text>
			</button>
		</view>
	</view>
</template>
<script>
	import popup from '@/uni_modules/uni-popup/components/uni-popup/popup.js'
	import provinceData from '@/components/fd-picker/city-china.json';
	export default {
		components: {},
		name: "uniPopupDialog",
		mixins: [popup],
		emits: ['confirm', 'close'],
		props: {
			id: {
				type: Number,
				default () {
					return 0;
				}
			},
		},
		data() {
			return {

				is_init: false,
				nav_list: [],
				img_url: '',
				where_val: [{
						"value": '固定值',
						"text": "固定值",
					},
					{
						"value": "前端传值",
						"text": "前端传值",
					},
					{
						"value": "后端生成",
						"text": "后端生成",
					},
				],
				provinceData: provinceData, //本地省市区数据
			}
		},
		mounted() {
			this.img_url = uni.getStorageSync('img_url')

		},
		methods: {
			on_sava() {
				var that = this;
				this.find = {};
				this.find.id = this.id
				this.Http.post('banmichaoqiangbizhi/admin/Article/dels', this.find).then(ret => {
					uni.showToast({
						title: ret.msg,
						icon: 'none'
					})
					if (ret.status == 200) {
						this.$emit("confirm");
						this.on_close();
					}
				})
			},

			on_close() {
				this.popup.close();
			},

		}
	}
</script>

<style>
	button::after {
		border: none;
	}



	.uni-popup-dialog {
		width: 300px;
		border-radius: 11px;
		background-color: #fff;
	}

	.uni-dialog-title {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		justify-content: center;
		padding-top: 25px;
	}

	.uni-dialog-title-text {
		font-size: 16px;
		font-weight: 500;
	}

	.uni-dialog-content {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		justify-content: center;
		align-items: center;
		padding-top: 10px;
	}

	.uni-dialog-content-text {
		font-size: 14px;
		color: #6C6C6C;
	}

	.f20 {
		font-size: 24px;
	}

	.uni-dialog-button-group {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		border-top-color: #f5f5f5;
		border-top-style: solid;
		border-top-width: 1px;
	}

	.uni-dialog-button {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */

		flex: 1;
		flex-direction: row;
		justify-content: center;
		align-items: center;
		height: 45px;
	}

	.uni-border-left {
		border-left-color: #f0f0f0;
		border-left-style: solid;
		border-left-width: 1px;
	}

	.uni-dialog-button-text {
		font-size: 16px;
		color: #333;
	}

	.uni-button-color {
		color: #007aff;
	}

	.uni-dialog-input {
		flex: 1;
		font-size: 14px;
		border: 1px #eee solid;
		height: 40px;
		padding: 0 10px;
		border-radius: 5px;
		color: #555;
	}

	.uni-popup__success {
		color: #4cd964;
	}

	.uni-popup__warn {
		color: #f0ad4e;
	}

	.uni-popup__error {
		color: #dd524d;
	}

	.uni-popup__info {
		color: #909399;
	}
</style>